package week8.homework;


//********************************************************************
//  PhoneList.java       Author: Lewis/Loftus
//
//  Driver for testing a sorting algorithm.
//********************************************************************

import week8.homework.Sorting1;
import week8.homework.Sorting1;

public class PhoneList2
{
    //-----------------------------------------------------------------
    //  Creates an array of Contact objects, sorts them, then prints
    //  them.
    //-----------------------------------------------------------------
    public static void main(String[] args)
    {
        Contact1[] friends = new Contact1[8];

        friends[0] = new Contact1("John", "Smith", "610-555-7384");
        friends[1] = new Contact1("Sarah", "Barnes", "215-555-3827");
        friends[2] = new Contact1("Mark", "Riley", "733-555-2969");
        friends[3] = new Contact1("Laura", "Getz", "663-555-3984");
        friends[4] = new Contact1("Larry", "Smith", "464-555-3489");
        friends[5] = new Contact1("Frank", "Phelps", "322-555-2284");
        friends[6] = new Contact1("Mario", "Guzman", "804-555-9066");
        friends[7] = new Contact1("Marsha", "Grant", "243-555-2837");

        Sorting1.selectionSort(friends);

        for (Contact1 friend : friends)
            System.out.println(friend);

    }
}


